package top.codedance.iotp.server.net.handle.subhandle.controller.http.sync;

import com.alibaba.fastjson.JSONObject;
import top.codedance.iotp.server.ServerApplication;
import top.codedance.iotp.server.net.handle.subhandle.controller.AdapterController;

public class InformationController extends AdapterController {
    public String doSubHandler(JSONObject body) {
        try {
            if (!adminVerification() && !netVerification()) {
                return response403("No access");
            }
            return okResponse(ServerApplication.getServerInfomation());
        } catch (Exception e) {
            return response500( "Programe exception");
        }
    }
}
